/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Clases;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author PaBLo
 */
@Embeddable
public class AlumnonotaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idAlumno")
    private short idAlumno;
    @Basic(optional = false)
    @Column(name = "idNota")
    private short idNota;

    public AlumnonotaPK() {
    }

    public AlumnonotaPK(short idAlumno, short idNota) {
        this.idAlumno = idAlumno;
        this.idNota = idNota;
    }

    public short getIdAlumno() {
        return idAlumno;
    }

    public void setIdAlumno(short idAlumno) {
        this.idAlumno = idAlumno;
    }

    public short getIdNota() {
        return idNota;
    }

    public void setIdNota(short idNota) {
        this.idNota = idNota;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idAlumno;
        hash += (int) idNota;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AlumnonotaPK)) {
            return false;
        }
        AlumnonotaPK other = (AlumnonotaPK) object;
        if (this.idAlumno != other.idAlumno) {
            return false;
        }
        if (this.idNota != other.idNota) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Clases.AlumnonotaPK[ idAlumno=" + idAlumno + ", idNota=" + idNota + " ]";
    }
    
}
